package com.yuexun.dhdoctor.module.my.model.impl;


import com.yuexun.dhdoctor.base.BaseEntity;
import com.yuexun.dhdoctor.module.my.api.ResetPasswordApi;
import com.yuexun.dhdoctor.module.my.model.IResetPasswordModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/11/23.
 */
public class ResetPasswordModel implements IResetPasswordModel {
    private ResetPasswordApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public ResetPasswordApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(ResetPasswordApi.class);
        }
    }

    @Override
    public Observable<BaseEntity> resetPassword(Map<String, String> praise) {
        api = ApiInstance();
        return api.resetPassword(praise);
    }
}
